package com.cym.controller;


import com.cym.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller("/api/user")
public class UserController {
    //value: 请求路径
    //method: 指定请求的方式
    //produces: 指定返回值的数据类型
    @RequestMapping(value = "/user/hi")
    public String getList() {
        return "员工列表数据";
    }

    @RequestMapping(value = "/user/info")
    public User getUser() {
        User user = new User();
        user.setId(1);
        user.setName("张三");
        user.setPassword("<PASSWORD>");
        user.setAge("18");
        user.setSex("男");
        user.setEmail("<EMAIL>");
        user.setPhone("12345678901");
        user.setAddress("上海");
        return user;
    }
}
